(function () {
    let PINs_func = [
        // ['PIN_1','NC'],
        // ['PIN_2','GND'],
        // ['PIN_3','5V'],
        // ['PIN_4','NC'],
        [
            'PIN_5',
            'GPIO_5', 'SSI_DATA', 'SPI_IO2', 'UART2_CTS', 'PMW5', 'DFT_JJTAG_TCK'
        ],
        ['PIN_6',
            'GPIO_13', 'UART_CTS', 'DFT_JTAG_TDO', 'JTAG_TMS'
        ],
        ['PIN_7',
            'GPIO_7', 'PWM7', 'UART2_RXD', 'SPI0_SCK', 'I2S_MCLK', 'ADC0'
        ]
        , ['PIN_8',
            'GPIO_6', 'PWM6', 'UART2_RTS', 'SPI1_SCK', 'DFT_JTAG_TDI', 'SPI0_OUT'
        ], ['PIN_9',
            'GPIO_3', 'PWM3', 'SPI1_IO1'
        ], ['PIN_10',
            'GPIO_2', 'PWM2', 'SPI_IO3'
        ], ['PIN_11',
            'GPIO_4', 'SSI_CLK', 'PWM4', 'SPI1_IO1', 'DFT_JTAG_TMS', 'JTAG_ENABLE'
        ], ['PIN_12',
            'GPIO_0', 'PWM0', 'SPI1_CSN', 'JTAG_TDI'
        ],
        // ['PIN_13',
        //     'GND'
        // ],
        ['PIN_14',
            'UART1_TXD', 'GPIO_15', 'I2C1_SDA'
        ], ['PIN_15',
            'UART1_RXD', 'GPIO_16', 'I2C1_SCL'
        ], ['PIN_16',
            'GPIO_12', 'PWM4', 'I2S_DI', 'ADC5'
        ], ['PIN_17',
            'GPIO_14', 'DFT_JTAG_TRSTN', 'UART1_RTS'
        ], ['PIN_18',
            'GPIO_1', 'PWM1', 'SPI1_IO0', 'JTAG_MODE'
        ], ['PIN_19',
            'GPIO_8', 'PWM0', 'UART2_TXD', 'SPI0_CS1_N', 'ADC1'
        ], ['PIN_20',
            'GPIO_10', 'PWM2', 'SPI0_CS0_N', 'I2S_SCLK', 'ADC3'
        ], ['PIN_21',
            'GPIO_11', 'PWM3', 'SPI0_IN', 'I2S_LRCLK', 'ADC4'
        ], ['PIN_22',
            'GPIO_9', 'PWM1', 'SPI0_OUT', 'I2S_DO', 'JTAG_TDO', 'ADC2'
        ],
        // ['PIN_23', 'NC'],
        // ['PIN_24', 'NC'],
        //  ['PIN_25','GND'],
        // ['PIN_26', 'VIN'],
        // ['PIN_27', '3V3'],
        // ['PIN_28', 'RST']
    ];
    let PINs = {};
    PINs_func.filter((item) => item.find((i) => i.startsWith('GPIO_'))).map(item => PINs[item.find((i) => i.startsWith('GPIO_'))] = [item.join('/'), parseInt(item.find((i) => i.startsWith('GPIO_')).substring(5))]);
    // console.log(PINs);
    let PublicGPIOOptions = PINs_func.filter(v => v[1].indexOf('GPIO') > -1).map((v) => PINs[v[1]]);
    // console.log(PublicGPIOOptions);
    let PublicPWMOptions = Object.values(PINs).filter(v => v[0].indexOf('PWM') >= 0);
    OpenBlock.Env.registerNativeFunction('WS63E_V1', "iot_gpio.h", "iot_gpio.h", [
        {
            method_name: 'IoTGpioInit',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'IoTGpioDeinit',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'IoTGpioSetDir',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: 'direction', provider: {
                        type: 'dropdown', property: [['IN', 0], ['OUT', 1]], valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'IoTGpioSetOutputVal',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: 'value', provider: {
                        type: 'dropdown', property: [['0', 0], ['1', 1]], valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'hi_io_set_pull',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: 'value', provider: {
                        type: 'dropdown', property: [['None', 0], ['UP', 1], ['DOWN', 2]], valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'rs_IoTGpioGetInputVal',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
            ],
            returnType: 'Integer'
        },
        {
            method_name: 'hi_io_set_func_gpio',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'rs_IoTGpioRegisterIsrFunc',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicGPIOOptions, valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: 'edge', provider: {
                        type: 'dropdown', property: [['falling', 0], ['rising', 1], ['both', 2]], valueType: 'Integer'
                    }
                },
                { type: 'String', name: 'title' },
            ]
        },
    ]);


    OpenBlock.Env.registerNativeFunction('WS63E_V1', 'ssd1306.h', 'ssd1306.h', [
        {
            method_name: 'ssd1306_UpdateScreen',
        },
        {
            method_name: 'ssd1306_Fill',
            arguments: [
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean' } },
            ],
            returnType: 'void'
        },
        {
            method_name: 'ssd1306_Init',
            arguments: [
                { type: 'Boolean', name: 'MIRROR_VERT', provider: { type: 'Boolean', value: false } },
                { type: 'Boolean', name: 'MIRROR_HORIZ', provider: { type: 'Boolean', value: false } },
            ],
            returnType: 'void'
        },
        {
            method_name: 'ssd1306_SetContrast',
            arguments: [
                { type: 'Integer', name: 'contrast', provider: { type: 'Integer', value: 0xFF } },
            ],
            returnType: 'void'
        },
        {
            method_name: 'ssd1306_SetDisplayOn',
            arguments: [
                { type: 'Boolean', name: 'on', provider: { type: 'Boolean', value: true } },
            ],
            returnType: 'void'
        },
        {
            method_name: 'ssd1306_GetDisplayOn',
            returnType: 'Boolean'
        },
        {
            method_name: 'ssd1306_SetCursor',
            arguments: [
                { type: 'Integer', name: 'x', provider: { type: 'Integer', value: 0 } },
                { type: 'Integer', name: 'y', provider: { type: 'Integer', value: 0 } },
            ]
        },
        {
            method_name: 'ssd1306_GetCursorX',
            returnType: 'Integer'
        },
        {
            method_name: 'ssd1306_GetCursorY',
            returnType: 'Integer'
        },
        {
            method_name: 'ssd1306_DrawASCIIString',
            arguments: [
                { type: 'String', name: 'index', provider: { type: 'String', value: 'Hello World!' } },
                {
                    type: 'Integer', name: 'FontDef', provider: {
                        type: 'dropdown', property: [['6x8', 0], ['7x10', 1], ['11x18', 2], ['16x26', 3]], valueType: 'Integer'
                    }
                },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ]
        },
        {
            method_name: 'ssd1306_DrawUTF8String',
            arguments: [
                { type: 'String', name: 'index', provider: { type: 'String', value: 'Hello World!' } },
                {
                    type: 'String', name: 'font', provider: {
                        type: 'BitmapFontProvider'
                    }
                },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ]
        },
        // {
        //     method_name: 'bitmapFont_draw_string',
        //     arguments: [
        //         { type: 'Integer', name: 'font', provider: { type: 'BitmapFontProvider', value: 0 } },
        //         { type: 'String', name: 'index', provider: { type: 'String', value: 0 } },
        //         { type: 'Integer', name: 'x', provider: { type: 'Integer', value: 0 } },
        //         { type: 'Integer', name: 'y', provider: { type: 'Integer', value: 0 } },
        //     ]
        // },
        // {
        //     method_name: 'ssd1306_Show_Str_Line',
        //     arguments: [
        //         { type: 'Integer', name: 'line' },
        //         { type: 'String', name: 'str' },
        //         { type: 'Integer', name: 'size', provider: { type: 'Integer', value: 12 } },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, {
        //     method_name: 'ssd1306_Show_Str',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'String', name: 'str' },
        //         { type: 'Integer', name: 'size' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // },
        {
            method_name: 'ssd1306_DrawPixel',
            arguments: [
                { type: 'Integer', name: 'x' },
                { type: 'Integer', name: 'y' },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ],
            returnType: 'void'
        },
        {
            method_name: 'ssd1306_DrawCircle',
            arguments: [
                { type: 'Integer', name: 'x' },
                { type: 'Integer', name: 'y' },
                { type: 'Integer', name: 'r' },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ],
            returnType: 'void'
        },
        // {
        //     method_name: 'ssd1306_DrawHLine',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'w' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, 
        // {
        //     method_name: 'ssd1306_DrawVLine',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'h' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, 
        {
            method_name: 'ssd1306_DrawLine',
            arguments: [
                { type: 'Integer', name: 'x1' },
                { type: 'Integer', name: 'y1' },
                { type: 'Integer', name: 'x2' },
                { type: 'Integer', name: 'y2' },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ],
            returnType: 'void'
        }, {
            method_name: 'ssd1306_DrawRectangle',
            arguments: [
                { type: 'Integer', name: 'x1' },
                { type: 'Integer', name: 'y1' },
                { type: 'Integer', name: 'x2' },
                { type: 'Integer', name: 'y2' },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ],
            returnType: 'void'
        },
        // {
        //     method_name: 'ssd1306_FillRectangle',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'w' },
        //         { type: 'Integer', name: 'h' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, 
        {
            method_name: 'ssd1306_DrawArc',
            arguments: [
                { type: 'Integer', name: 'x' },
                { type: 'Integer', name: 'y' },
                { type: 'Integer', name: 'radius' },
                { type: 'Integer', name: 'start_angle' },
                { type: 'Integer', name: 'sweep' },
                { type: 'Boolean', name: 'light', provider: { type: 'Boolean', value: true } },
            ],
            returnType: 'void'
        },
        //  {
        //     method_name: 'ssd1306_FillCircle',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'radius' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // },
        //  {
        //     method_name: 'ssd1306_DrawRoundRect',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'w' },
        //         { type: 'Integer', name: 'h' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, {
        //     method_name: 'ssd1306_DrawfillRoundRect',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'w' },
        //         { type: 'Integer', name: 'h' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, {
        //     method_name: 'ssd1306_DrawEllipse',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'Rx' },
        //         { type: 'Integer', name: 'Ry' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, {
        //     method_name: 'ssd1306_DrawFillEllipse',
        //     arguments: [
        //         { type: 'Integer', name: 'x' },
        //         { type: 'Integer', name: 'y' },
        //         { type: 'Integer', name: 'Rx' },
        //         { type: 'Integer', name: 'Ry' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, {
        //     method_name: 'ssd1306_DrawTriangle',
        //     arguments: [
        //         { type: 'Integer', name: 'x1' },
        //         { type: 'Integer', name: 'y1' },
        //         { type: 'Integer', name: 'x2' },
        //         { type: 'Integer', name: 'y2' },
        //         { type: 'Integer', name: 'x3' },
        //         { type: 'Integer', name: 'y3' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // }, {
        //     method_name: 'ssd1306_DrawFillTriangle',
        //     arguments: [
        //         { type: 'Integer', name: 'x1' },
        //         { type: 'Integer', name: 'y1' },
        //         { type: 'Integer', name: 'x2' },
        //         { type: 'Integer', name: 'y2' },
        //         { type: 'Integer', name: 'x3' },
        //         { type: 'Integer', name: 'y3' },
        //         { type: 'Boolean', name: 'light' },
        //     ],
        //     returnType: 'void'
        // },
    ]);

    OpenBlock.Env.registerNativeFunction('WS63E_V1', "iot_uart.h", "iot_uart.h", [
        {
            method_name: 'r_IoTUartInit',
            arguments: [

                {
                    type: 'Integer', name: 'uart_id',
                    provider: {
                        type: 'dropdown', property: [
                            ['2', '2'],
                            ['1', '1'],
                            ['0', '0'],
                        ], valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: "baudRate", field: {
                        type: 'dropdown', options: [
                            ['600', '600'],
                            ['1200', '1200'],
                            ['2400', '2400'],
                            ['4800', '4800'],
                            ['9600', '9600'],
                            ['19200', '19200'],
                            ['38400', '38400'],
                            ['57600', '57600'],
                            ['74880', '74880'],
                            ['115200', '115200'],
                        ], valueType: 'Integer'
                    }
                }, {
                    type: 'Integer', name: "dataBits", field: {
                        type: 'dropdown', options: [
                            ['8', '8'],
                            ['7', '7'],
                            ['6', '6'],
                            ['5', '5'],
                        ], valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: "stopBits", field: {
                        type: 'dropdown', options: [
                            ['1', '1'],
                            ['2', '2'],
                        ], valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: "parity", field: {
                        type: 'dropdown', options: [
                            ['0', '0'],
                            ['1', '1'],
                            ['2', '2'],
                        ], valueType: 'Integer'
                    }
                },
            ],
            returnType: 'Integer'
        },
        {
            method_name: 'IoTUartDeinit',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'Integer', name: 'uart_id',
                    provider: {
                        type: 'dropdown', property: [
                            ['2', '2'],
                            ['1', '1'],
                            ['0', '0'],
                        ], valueType: 'Integer'
                    }
                },],
        },
        {
            method_name: 'r_IoTUartRead(vm,',
            returnType: 'list<Integer>',
            arguments: [
                {
                    type: 'Integer', name: 'uart_id',
                    provider: {
                        type: 'dropdown', property: [
                            ['2', '2'],
                            ['1', '1'],
                            ['0', '0'],
                        ], valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: 'maxLength',
                    provider: {
                        type: 'Integer',
                        value: 32
                    }
                }
            ],
        },
        {
            method_name: 'r_IoTUartWrite(vm,',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'Integer', name: 'uart_id',
                    provider: {
                        type: 'dropdown', property: [
                            ['2', '2'],
                            ['1', '1'],
                            ['0', '0'],
                        ], valueType: 'Integer'
                    }
                },
                {
                    type: 'list<Integer>', name: 'data'
                }
            ],
        },
    ]);

    OpenBlock.Env.registerNativeFunction('WS63E_V1', "iot_pwm.h", "iot_pwm.h", [
        {
            method_name: 'hi_io_set_func_pwm',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicPWMOptions, valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'rs_IoTPwmInit',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicPWMOptions, valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'rs_IoTPwmStart',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicPWMOptions, valueType: 'Integer'
                    }
                },
                {
                    type: 'Integer', name: 'duty', provider: {
                        type: 'Integer', value: 50
                    }
                },
                {
                    type: 'Integer', name: 'freq', provider: {
                        type: 'Integer', value: 4000
                    }
                },
            ]
        },
        {
            method_name: 'rs_IoTPwmStop',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicPWMOptions, valueType: 'Integer'
                    }
                },
            ]
        },
        {
            method_name: 'rs_IoTPwmDeinit',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicPWMOptions, valueType: 'Integer'
                    }
                },
            ]
        },
    ]);

    let PublicADCOptions = Object.values(PINs).filter(v => v[0].indexOf('ADC') >= 0);
    OpenBlock.Env.registerNativeFunction('WS63E_V1', "hi_adc.h", "hi_adc.h", [
        {
            method_name: 'ADC_Start',
            returnType: 'void',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicADCOptions, valueType: 'Integer'
                    }
                }
            ]
        },
        {
            method_name: 'analogRead',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'Integer', name: 'pin', provider: {
                        type: 'dropdown', property: PublicADCOptions, valueType: 'Integer'
                    }
                }
            ]
        },
        {
            method_name: 'hi_adc_convert_to_voltage',
            returnType: 'Number',
            arguments: [
                {
                    type: 'Integer', name: 'analog', provider: {
                        type: 'Integer', value: 0
                    }
                }
            ]
        },
    ]);

    OpenBlock.Env.registerNativeFunction('WS63E_V1', "cmsis_os2.h", "cmsis_os2.h", [
        // {
        //     method_name: 'osDelay',
        //     arguments: [
        //         { type: 'Integer', name: 'ticks', provider: { type: 'Integer', value: 1 } },
        //     ],
        // },
        // {
        //     method_name: 'usleep',
        //     arguments: [
        //         { type: 'Integer', name: 'microsecond', provider: { type: 'Integer', value: 1 } },
        //     ],
        // },
        {
            method_name: 'rl_nanosleep',
            arguments: [
                { type: 'Integer', name: 'second', provider: { type: 'Integer', value: 1 } },
                { type: 'Integer', name: 'nanosecond', provider: { type: 'Integer', value: 0 } },
            ],
        },
        {
            method_name: 'rl_nanosleep1',
            arguments: [
                { type: 'Integer', name: 'nanosecond', provider: { type: 'Integer', value: 0 } },
            ],
        },
        {
            method_name: 'osKernelGetTickCount',
            arguments: [
            ],
            returnType: 'Integer'
        },
        {
            method_name: 'osKernelGetTickFreq',
            arguments: [
            ],
            returnType: 'Integer'
        },
        {
            method_name: 'osKernelGetSysTimerCount',
            arguments: [
            ],
            returnType: 'Integer'
        },
        {
            method_name: 'osKernelGetSysTimerFreq',
            arguments: [
            ],
            returnType: 'Integer'
        },
    ]);
    OpenBlock.Env.registerNativeTypes(['WS63E_V1'], {
        'WifiScanInfo': [],
        'WifiLinkedInfo': [],
        'WifiDeviceConfig': [],
        'wifi_sta_config_stru': [],
    });
    OpenBlock.Env.registerEvents(['WS63E_V1'], "wifi_device.h", [
        { "name": "OnWifiConnectionChanged", "argType": "WifiLinkedInfo" },
        { "name": "OnWifiScanStateChanged", "argType": "Integer" },
        { "name": "OnHotspotStateChanged", "argType": "Integer" },
        { "name": "OnHotspotStaJoin", "argType": "StationInfo" },
        { "name": "OnHotspotStaLeave", "argType": "StationInfo" },
    ]);
    OpenBlock.Env.registerNativeFunction('WS63E_V1', 'wifi_device.h', 'wifi_device.h', [
        {
            method_name: 'EnableWifi',
            returnType: 'Integer',
            arguments: [],
        },
        {
            method_name: 'DisableWifi',
            returnType: 'Integer',
            arguments: [],
        },
        {
            method_name: 'IsWifiActive',
            returnType: 'Boolean',
        },
        {
            method_name: 'Scan',
            returnType: 'Integer',
            arguments: [],
        },
        {
            method_name: 'rl_wifi_GetScanInfoList(vm,',
            returnType: 'list<WifiScanInfo>',
            arguments: [
                {
                    type: 'Integer', name: 'maxCount', provider: { type: 'Integer', value: 10 }
                }],
        },
        {
            method_name: 'WifiScanInfoSSID#GetNobjStringField(WifiScanInfo,ssid)',
            returnType: 'String',
            arguments: [
                {
                    type: 'WifiScanInfo', name: 'WifiScanInfo'
                }
            ],
        },
        {
            method_name: 'WifiScanInfoRSSI#GetNobjIntegerOrNumberField(WifiScanInfo,rssi)',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'WifiScanInfo', name: 'WifiScanInfo'
                }
            ],
        },
        {
            method_name: 'WifiScanInfoSecurityType#GetNobjIntegerOrNumberField(WifiScanInfo,securityType)',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'WifiScanInfo', name: 'WifiScanInfo'
                }
            ],
        },
        {
            method_name: 'WifiScanInfoBand#GetNobjIntegerOrNumberField(WifiScanInfo,band)',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'WifiScanInfo', name: 'WifiScanInfo'
                }
            ],
        },
        {
            method_name: 'GetSignalLevel',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'Integer', name: 'rssi'
                },
                {
                    type: 'Integer', name: 'band'
                }],
        },
        // {
        //     method_name: 'rl_AddDeviceConfig_by_WifiScanInfo',
        //     returnType: 'Integer',
        //     arguments: [
        //         {
        //             type: 'WifiScanInfo', name: 'info'
        //         },
        //         {
        //             type: 'String', name: 'password'
        //         }],
        // },
        // {
        //     method_name: 'rl_AddDeviceConfig',
        //     returnType: 'Integer',
        //     arguments: [
        //         {
        //             type: 'String', name: 'ssid'
        //         },
        //         {
        //             type: 'String', name: 'password'
        //         },
        //         {
        //             type: 'Integer', name: 'securityType',
        //             provider: {
        //                 type: 'dropdown', property: [
        //                     ['WIFI_SEC_TYPE_OPEN', '0'],
        //                     ['WIFI_SEC_TYPE_WEP', '1'],
        //                     ['WIFI_SEC_TYPE_PSK', '2'],
        //                     ['WIFI_SEC_TYPE_EAP', '3'],
        //                     ['WIFI_SEC_TYPE_SAE', '4'],
        //                     ['WIFI_SEC_TYPE_EAP_SUITE_B', '5'],
        //                     ['WIFI_SEC_TYPE_OWE', '6'],
        //                     ['WIFI_SEC_TYPE_WAPI_CERT', '7'],
        //                     ['WIFI_SEC_TYPE_WAPI_PSK', '8']
        //                 ], valueType: 'Integer'
        //             }
        //         }],
        // },
        {
            method_name: 'rl_GetDeviceConfigs(vm)',
            returnType: 'list<WifiDeviceConfig>',
        },
        {
            method_name: 'ScanAndConnectToWifi',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'String', name: 'ssid'
                },
                {
                    type: 'String', name: 'key'
                }
            ]
        },
        {
            method_name: 'ConnectToWifi',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'String', name: 'ssid'
                },
                {
                    type: 'String', name: 'bssid'
                },
                {
                    type: 'Integer', name: 'security_type', provider: {
                        type: 'dropdown', property: [
                            ['WIFI_SEC_TYPE_OPEN', 0],                 /*!< @if Eng Open.
                                                                     @else Open。 @endif */
                            ['WIFI_SEC_TYPE_WEP', 1],                  /*!< @if Eng Wired Equivalent Privacy SHARED system (WEP-SHARED).
                                                                     @else WEP。 @endif */
                            ['WIFI_SEC_TYPE_WPA2PSK', 2],              /*!< @if Eng WPA2-Personal.
                                                                     @else WPA2 个人级。 @endif */
                            ['WIFI_SEC_TYPE_WPA2_WPA_PSK_MIX', 3],     /*!< @if Eng WPA-Personal and WPA2-Personal mixed.
                                                                     @else 个人级的WPA和WPA2混合。 @endif */
                            ['WIFI_SEC_TYPE_WPAPSK', 4],               /*!< @if Eng WPA-Personal.
                                                                     @else WPA 个人级。 @endif */
                            ['WIFI_SEC_TYPE_WPA', 5],                  /*!< @if Eng WPA-Enterprise.
                                                                     @else WPA 企业级。 @endif */
                            ['WIFI_SEC_TYPE_WPA2', 6],                 /*!< @if Eng WPA2-Enterprise.
                                                                     @else WPA2 企业级。 @endif */
                            ['WIFI_SEC_TYPE_SAE', 7],                  /*!< @if Eng Simultaneous Authentication of Equals (SAE).
                                                                     @else SAE(WPA3个人级)。 @endif */
                            ['WIFI_SEC_TYPE_WPA3_WPA2_PSK_MIX', 7],    /*!< @if Eng WPA2-Personal and WPA3-Personal mixed.
                                                                     @else 个人级的WPA2和WPA3混合。 @endif */
                            ['WIFI_SEC_TYPE_WPA3', 8],                 /*!< @if Eng WPA3-Enterprise.
                                                                     @else WPA3 企业级。 @endif */
                            ['WIFI_SEC_TYPE_OWE', 9],                  /*!< @if Eng Opportunistic wireless encryption(OWE).
                                                                     @else OWE。 @endif */
                            ['WIFI_SEC_TYPE_WAPI_PSK', 10],             /*!< @if Eng WAPI Personal.
                                                                     @else WAPI 个人级。 @endif */
                            ['WIFI_SEC_TYPE_WAPI_CERT', 11],            /*!< @if Eng WAPI Enterprise.
                                                                     @else WAPI 企业级。 @endif */
                            ['WIFI_SEC_TYPE_WPA3_WPA2_MIX', 12],        /*!< @if Eng WPA2-Enterprise and WPA3-Enterprise mixed.
                                                                     @else 企业级的WPA2和WPA3混合。 @endif */
                            ['WIFI_SEC_TYPE_WEP_OPEN', 13],             /*!< @if Eng Wired Equivalent Privacy OPEN system (WEP-OPEN).
                                                                     @else WEP-OPEN。 @endif */
                        ], valueType: 'Integer'
                    }
                },
                {
                    type: 'String', name: 'key'
                }
            ]
        },
        {
            method_name: 'ConnectToWifiByScanInfo',
            returnType: 'Integer',
            arguments: [
                {
                    type: 'WifiScanInfo', name: 'info'
                },
                {
                    type: 'String', name: 'key'
                }
            ]
        },
        {
            method_name: 'Disconnect',
            returnType: 'Integer',
        },
        {
            method_name: 'WifiLinkedInfo_ssid#GetNobjStringField(WifiLinkedInfo,ssid)',
            returnType: 'String',
            arguments: [
                {
                    type: 'WifiLinkedInfo', name: 'WifiLinkedInfo'
                }
            ]
        },
        {
            method_name: 'GetDeviceMacAddressText#getStr(18)',
            arguments: [],
            returnType: 'String'
        },
        // {
        //     method_name: 'rl_GetIpAddr(vm)',
        //     arguments: [],
        //     returnType: 'String'
        // },
        // {
        //     method_name: 'rl_GetNetMaskAddr(vm)',
        //     arguments: [],
        //     returnType: 'String'
        // },
        // {
        //     method_name: 'rl_GetNetGateAddr(vm)',
        //     arguments: [],
        //     returnType: 'String'
        // }
    ]);


})();